package com.comm.utils;

import java.util.Map;
import java.util.Set;

import org.apache.commons.collections.MapUtils;

 
public class MapUtil extends MapUtils {

	public static String toString(Map map) {
		if (map == null) {
			return "";
		}
		Set<String> set = map.keySet();
		StringBuffer mapString = new StringBuffer();
		for (String key : set) {
			Object value = map.get(key);
			mapString.append("{").append(key).append(":").append(value)
					.append("}");
		}
		return mapString.toString();
	}
	public static int getInteger(Map map,String key){
		if(map==null) return 0;
		if(StringUtil.isBlank(key)) return 0;
		
		key=key.toLowerCase();
		
		if( StringUtil.isBlank(map.get(key)))
		return 0;
		return Integer.parseInt(map.get(key).toString() );
		
	}
	public static void main(String[] args) {
		String s="SSSDSSssss";
		System.out.println(s.toLowerCase());
	}
	 
}
